package com.yonyou.lxp.xutils3test.mvp.user.view;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.yonyou.lxp.xutils3test.R;
import com.yonyou.lxp.xutils3test.mvp.user.presenter.PUser;
import com.yonyou.lxp.xutils3test.ui.BaseActivity;


public class UserActivity extends BaseActivity implements IUser {

    private PUser pUser;
    private Button button;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user);

        pUser = new PUser(this);
        pUser.onCreate();
        button = (Button) findViewById(R.id.btn_s);
        button.setOnClickListener(this);
    }

    @Override
    public void SetData(String data) {
        button.setText(data);
    }

    @Override
    public void onMyClick(View v) {
        switch (v.getId()) {
            case R.id.btn_s:
                pUser.performOnClick();
                break;
        }
    }
}
